<template>
    <div>
        <NavBar :title="title"></NavBar>
        <van-row>
            <van-col span="8">
                <van-sidebar v-model="active">
                    <van-sidebar-item v-for="item in categoriesApiData" :title="item.cat_name" />
                </van-sidebar>
            </van-col>
            <van-col span="8">span: 8</van-col>
        </van-row>
    </div>
</template>

<script setup>
import NavBar from '@/components/NavBar.vue';
let title = '商场'
import { ref } from "vue";
import { categoriesApi } from "@/api/api";
const categoriesApiData = ref([])
categoriesApi().then(res => {
    console.log('分类数据', res);
    categoriesApiData.value = res.data.message
})
  const active = ref(1);
</script>

<style lang="scss" scoped></style>